<script th:inline="javascript"  th:fragment="siderBar" xmlns:th="http://www.thymeleaf.org">
    $(function(){
        $("#tab-user").addClass('current')
        var tabName = getQueryString("tab");
        $("#"+tabName).addClass('current').parent().siblings().find('a').removeClass('current');

    });

    /**
     * 获取参数
     * @param name
     * @returns {null}
     */
    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]); return null;
    }
</script>